<<<<<<<< HEAD:src/Demo01/BankAccount/Test.java
package Demo01.BankAccount;
========
package BankAccount;
>>>>>>>> origin/master:src/BankAccount/Test.java

class BankAccount {
    private String Date;
    private double Money;
    private String BankAccountId;

    public BankAccount() {
        BankAccountId = "";
        Money = 0.0;
    }

    public BankAccount(String ID, String date, double balance) {
        Date = date;
        BankAccountId = ID;
        Money = balance;
    }

    public String getBankAccountId() {
        return BankAccountId;
    }

    public void getBankAccountId(String ID) {
        BankAccountId = ID;
    }

    public double getBalance() {
        return Money;
    }

    public void printAccountMsg() {
        System.out.println("账户名：" + BankAccountId + " 开户日期 " + Date + " 当前余额" + Money + "元\n");
    }

    public void Bankin(double money) {
        System.out.print("此次存入：" + money + "元 ");
        Money += money;
    }

    public void Bankout(double money) {
        System.out.print("此次取出：" + money + "元 ");
        if (money <= Money)
            Money -= money;
        else
            System.out.println("账户余额不足，操作失败！");
    }
}

public class Test {
    public static void main(String[] args) {
        BankAccount user = new BankAccount("user", "2020-03-24", 150000);
        user.printAccountMsg();
        user.Bankin(15000);
        user.printAccountMsg();
        user.Bankout(300000);
        user.printAccountMsg();
    }
}
